.alfresco-forms-controls-MultiSelect {
   border: @standard-border;
   box-shadow: @inset-box-shadow;
   box-sizing: border-box;
   padding: 5px 5px 0;
   position: relative;
   * {
      box-sizing: inherit;
   }
   &__container {
   }
   &__off-screen-search {
      font-size: @normal-font-size;
      left: -9999px;
      margin: 0;
      padding: 0;
      position: absolute;
      top: -9999px;
   }
   &__search-box {
      background: transparent;
      border: 0;
      color: @general-font-color;
      display: inline-block;
      font-size: @normal-font-size;
      line-height: 22px;
      margin: 0 0 5px 0;
      max-width: 100%;
      padding: 0;
      vertical-align: baseline;
      width: 50px;
      &:focus {
         outline: 0;
      }
   }
   &__results {
      background: @list-background-color;
      box-shadow: @standard-box-shadow;
      display: none;
      list-style: none;
      margin: 0;
      overflow: hidden;
      padding: 0;
      position: absolute;
      z-index: 1000;
      > * {
         border: solid @standard-border-color;
         border-width: 1px 1px 0;
         font-size: @normal-font-size;
         margin: 0;
         overflow: hidden;
         padding: 5px 0 5px 5px;
         text-overflow: ellipsis;
         white-space: nowrap;
      }
      &__loading-message, &__error-message, &__no-results-message {
         border-width: 1px;
         display: none;
      }
      &__no-results-message {
         color: @de-emphasized-font-color;
      }
      &__error-message {
         color: #c00;
         font-family: @bold-font;
         font-weight: 700;
         white-space: normal;
      }
      &__result {
         border-top-color: #ccc;
         cursor: pointer;
         &__highlighted-label {
            color: @general-font-color;
            font-family: @bold-font;
            font-weight: 700;
            text-decoration: underline;
         }
         &:first-child {
            border-top-color: @standard-border-color;
         }
         &:last-child {
            border-bottom-width: 1px;
         }
         &--focused {
            background: #06a;
            color: @highlighted-font-color;
            * {
               color: @highlighted-font-color;
            }
         }
         &--already-chosen {
            background: @list-background-color;
            color: @de-emphasized-font-color;
            cursor: default;
         }
      }
      &--visible {
         display: block;
      }
      &--error {
         .alfresco-forms-controls-MultiSelect {
            &__results__error-message {
               border-color: #c00;
               display: block;
            }
         }
      }
      &--loading {
         .alfresco-forms-controls-MultiSelect {
            &__results__loading-message {
               display: block;
            }
         }
      }
      &--empty {
         .alfresco-forms-controls-MultiSelect {
            &__results__no-results-message {
               display: block;
            }
         }
      }
   }
   &--has-error {
      border-color: #c00;
      box-shadow: 0 0 1px 1px #ffc4c4;
   }
   &--focused {
      border-color: #09c;
      box-shadow: 0 0 1px 1px #80e5ff;
   }
   &--disabled {
      background: #efefef;
      .alfresco-forms-controls-MultiSelect {
         &__choice {
            background: #ddd linear-gradient(to bottom, #eee, #ddd);
            &__content {
               color: #999;
            }
            &__close-button {
               display: none;
            }
         }
      }
   }
}

.alfresco-dialog-AlfDialog.dijitDialog {
   .alfresco-forms-controls-MultiSelect {
      &__search-box {
         border: 0;
      }
   }
}
